<template>
  <div class="home">
    <!-- <app-head></app-head> -->
    <app-nav></app-nav>
    <keep-alive>
      <router-view />
    </keep-alive>
  </div>
</template>

<script>
import appNav from "@/components/app-nav.vue";
import appHead from "@/components/app-head.vue";
export default {
  name: "Home",
  components: {
    appNav,
    appHead,
  },
  beforeRouteEnter(to, from, next) {
    if (localStorage.getItem("user")) {
      next();
    } else {
      next({ path: "/login" });
    }
  },
};
</script>

<style lang="scss" scoped>
@import "@/assets/common/variable.scss";
.home {
  height: 100%;
  background-color: #121212;
}
</style>